Skip to content

Fix top pages comparison tooltip missing date labels#6221

Merged
sanne-san merged 3 commits intomasterfrom
sanne-top-pages-tooltip
Apr 6, 2026
Merged

Fix top pages comparison tooltip missing date labels#6221
sanne-san merged 3 commits intomasterfrom
sanne-top-pages-tooltip

Conversation

@sanne-san
Copy link
Copy Markdown
Contributor

@sanne-san sanne-san commented Apr 3, 2026

Changes

  • The /pages endpoint was using Map.merge on a Jason.OrderedObject, which silently drops any merged keys during JSON encoding. Convert to a plain map first so date range labels are included in the response.

Before:
CleanShot 2026-04-03 at 09 43 30@2x

After:
CleanShot 2026-04-03 at 09 43 04@2x

Tests

  • This PR does not require tests

Changelog

  • Entry has been added to changelog

Documentation

  • This change does not need a documentation update

Dark mode

  • The UI has been tested both in dark and light mode

- The `/pages` endpoint was using `Map.merge` on a `Jason.OrderedObject`, which silently drops any merged keys during JSON encoding. Convert to a plain map first so date range labels are included in the response.
@sanne-san sanne-san requested a review from a team April 3, 2026 08:02
json(conn, %{
results: pages,
meta: Map.merge(meta, Stats.Breakdown.formatted_date_ranges(query)),
meta: Map.new(meta.values) |> Map.merge(Stats.Breakdown.formatted_date_ranges(query)),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion, non-blocking: I think we should add an assertion about pages.meta to an existing pages controller test, it doesn't seem to be covered at all right now.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, done!

@sanne-san sanne-san requested a review from apata April 6, 2026 09:34
@sanne-san sanne-san added this pull request to the merge queue Apr 6, 2026
Merged via the queue into master with commit ad92741 Apr 6, 2026
37 of 39 checks passed
@sanne-san sanne-san deleted the sanne-top-pages-tooltip branch April 6, 2026 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants